<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>春晓</h1>
    <div>春眠不觉晓</div>
    <div>处处闻啼鸟</div>

    <script>
        alert("这是谁的语文作业？")
        let name=prompt("这是谁的语文作业?")
        console.log(name)
        //1.定义函数和返回值
        function sayHello(name,score){
            console.log("这是"+name+"的语文作业"+" , 得到"+score+"分数")
            return score
        }
        sayHello(name,"80")
        let s=sayHello(name,"80")
        console.log(s)
        //2.另一种函数写法
        let sayHi=sayHello
        sayHi(name,"80")
        let people=function(username,mark){
            console.log(username+"改的作业 "+mark+"分数")
        }//匿名函数
        people("张老师",89)
        //3.箭头函数
        let p=(username,mark)=>{
            console.log(username+"改的作业 "+mark+"分数")
        }
        p("李老师",90)
        let aa=age=>alert(age)
        aa(20)
        //4.数据类型
        let bb=10
        console.log(typeof bb)
        let cc="你好"
        console.log(typeof cc)
        let dd=true
        console.log(typeof dd)
        let ff=undefined
        console.log(typeof ff)
        let gg={
            name:"张三",
            age:10
        }
        console.log(typeof gg)
        console.log(sayHi)
        //5.引用函数
        let arr=[1,2,3,5,6]
        console.log(arr instanceof Array)
        let arr1=new Array("小明","小花","小哈")
        console.log(arr1 instanceof Array)
        //6.包装对象
        let sss=new String("hello")
        console.log(sss instanceof String)
        let num=new Number(10)
        console.log(num instanceof Number)
        let bool=new Boolean(true)
        console.log(bool instanceof Boolean)
    </script>
</body>
</html>